﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BLL.Helper.Pagination;

namespace BLL.DTO.HelperDTO.Pagination
{
    [Serializable]
    public class PageList<T>
    {
        // Methods
        public PageList(IList<T> collection, PageRequestDTO pageRequest, int total)
        {
            this.Page = new PageResultDTO(pageRequest.PageIndex, pageRequest.PageSize, (long)total);
            this.List = collection;
        }

        // Properties
        public IList<T> List { get; private set; }

        public PageResultDTO Page { get; private set; }
    }
}
